home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "Calcu"
- ClientHeight = 3285
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 2175
- Icon = "calc.frx":0000
- LinkTopic = "Form1"
- Picture = "calc.frx":08CA
- ScaleHeight = 3285
- ScaleWidth = 2175
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command4
- BackColor = &H000000C0&
- Caption = "C"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1680
- Style = 1 'Graphical
- TabIndex = 20
- Top = 2520
- Width = 375
- End
- Begin VB.CommandButton Command3
- BackColor = &H000000FF&
- Caption = "Off"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1080
- Style = 1 'Graphical
- TabIndex = 19
- Top = 2520
- Width = 375
- End
- Begin VB.TextBox Text2
- BackColor = &H000000C0&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 720
- TabIndex = 17
- Top = 2880
- Width = 1335
- End
- Begin VB.CommandButton Command16
- BackColor = &H000000C0&
- Caption = "X"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 1680
- Style = 1 'Graphical
- TabIndex = 16
- Top = 600
- Width = 375
- End
- Begin VB.CommandButton Command15
- BackColor = &H000000C0&
- Caption = "
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 1680
- Style = 1 'Graphical
- TabIndex = 15
- Top = 1080
- Width = 375
- End
- Begin VB.CommandButton Command14
- BackColor = &H000000C0&
- Caption = "+"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 1680
- Style = 1 'Graphical
- TabIndex = 14
- Top = 1560
- Width = 375
- End
- Begin VB.CommandButton Command13
- BackColor = &H000000C0&
- Caption = "-"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 1680
- Style = 1 'Graphical
- TabIndex = 13
- Top = 2040
- Width = 375
- End
- Begin VB.CommandButton Command12
- BackColor = &H000000FF&
- Caption = "="
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 1080
- Style = 1 'Graphical
- TabIndex = 12
- Top = 2040
- Width = 375
- End
- Begin VB.CommandButton Command11
- BackColor = &H000000FF&
- Caption = "0"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 600
- Style = 1 'Graphical
- TabIndex = 11
- Top = 2040
- Width = 375
- End
- Begin VB.CommandButton Command100
- BackColor = &H000000FF&
- Caption = "."
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 18
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Index = 9
- Left = 120
- Style = 1 'Graphical
- TabIndex = 10
- Top = 2040
- Width = 375
- End
- Begin VB.CommandButton Command1
- BackColor = &H000000FF&
- Caption = "9"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Index = 8
- Left = 1080
- Style = 1 'Graphical
- TabIndex = 9
- Top = 1560
- Width = 375
- End
- Begin VB.CommandButton Command1
- BackColor = &H000000FF&
- Caption = "8"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Index = 7
- Left = 600
- Style = 1 'Graphical
- TabIndex = 8
- Top = 1560
- Width = 375
- End
- Begin VB.CommandButton Command1
- BackColor = &H000000FF&
- Caption = "7"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Index = 6
- Left = 120
- Style = 1 'Graphical
- TabIndex = 7
- Top = 1560
- Width = 375
- End
- Begin VB.CommandButton Command1
- BackColor = &H000000FF&
- Caption = "6"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Index = 5
- Left = 1080
- Style = 1 'Graphical
- TabIndex = 6
- Top = 1080
- Width = 375
- End
- Begin VB.CommandButton Command1
- BackColor = &H000000FF&
- Caption = "5"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Index = 4
- Left = 600
- Style = 1 'Graphical
- TabIndex = 5
- Top = 1080
- Width = 375
- End
- Begin VB.CommandButton Command1
- BackColor = &H000000FF&
- Caption = "4"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Index = 3
- Left = 120
- Style = 1 'Graphical
- TabIndex = 4
- Top = 1080
- Width = 375
- End
- Begin VB.CommandButton Command1
- BackColor = &H000000FF&
- Caption = "3"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Index = 2
- Left = 1080
- Style = 1 'Graphical
- TabIndex = 3
- Top = 600
- Width = 375
- End
- Begin VB.CommandButton Command1
- BackColor = &H000000FF&
- Caption = "2"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Index = 1
- Left = 600
- Style = 1 'Graphical
- TabIndex = 2
- Top = 600
- Width = 375
- End
- Begin VB.CommandButton Command1
- BackColor = &H000000FF&
- Caption = "1"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Index = 0
- Left = 120
- Style = 1 'Graphical
- TabIndex = 1
- Top = 600
- Width = 375
- End
- Begin VB.TextBox Text1
- BackColor = &H000000C0&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- IMEMode = 3 'DISABLE
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 1935
- End
- Begin VB.Label Label2
- Caption = "0"
- Height = 255
- Left = 120
- TabIndex = 21
- Top = 3600
- Width = 255
- End
- Begin VB.Line Line2
- X1 = 240
- X2 = 240
- Y1 = 2400
- Y2 = 2640
- End
- Begin VB.Line Line1
- X1 = 1080
- X2 = 240
- Y1 = 2640
- Y2 = 2640
- End
- Begin VB.Label Label1
- BackStyle = 0 'Transparent
- Caption = "&Answer:"
- Height = 375
- Left = 120
- TabIndex = 18
- Top = 2890
- Width = 615
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '111 Lines of Code
- Private Sub Command1_Click(Index As Integer)
- Text1.Text = Text1.Text + Command1(Index).Caption
- End Sub
- Private Sub Command100_Click(Index As Integer)
- If InStr(Text1.Text, ".") Then
- Exit Sub
- Text1.Text = Text1.Text + "."
- End If
- End Sub
- Private Sub Command12_Click()
- On Error GoTo errhandler
- If Label2.Caption = "1" Then
- Text2.Text = Text2.Text * Text1.Text
- Text1.Text = ""
- End If
- If Label2.Caption = "2" Then
- Text2.Text = Text2.Text / Text1.Text
- Text1.Text = ""
- End If
- If Label2.Caption = "3" Then
- Text2.Text = Text2.Text + Text1.Text
- Text1.Text = ""
- End If
- If Label2.Caption = "4" Then
- Text2.Text = Text2.Text - Text1.Text
- Text1.Text = ""
- End If
- errhandler:
- End Sub
- Private Sub Command13_Click()
- Label2.Caption = "4"
- On Error GoTo errhandler
- If Text2.Text = "" Then
- Text2.Text = Text1.Text
- Text1.Text = ""
- End If
- If Text2.Text > "0" Then
- Text1.Text = Text2.Text - Text1.Text
- Text2.Text = Text1.Text
- Text1.Text = ""
- End If
- errhandler:
- End Sub
- Private Sub Command14_Click()
- Label2.Caption = "3"
- On Error GoTo errhandler
- If Text2.Text = "" Then
- Text2.Text = Text1.Text
- Text1.Text = ""
- End If
- If Text2.Text > "0" Then
- Text1.Text = Text2.Text + Text1.Text
- Text2.Text = Text1.Text
- Text1.Text = ""
- End If
- errhandler:
- End Sub
- Private Sub Command15_Click()
- Label2.Caption = "2"
- On Error GoTo errhandler
- If Text2.Text = "" Then
- Text2.Text = Text1.Text
- Text1.Text = ""
- End If
- If Text2.Text > "0" Then
- Text1.Text = Text2.Text / Text1.Text
- Text2.Text = Text1.Text
- Text1.Text = ""
- End If
- errhandler:
- End Sub
- Private Sub Command16_Click()
- Label2.Caption = "1"
- On Error GoTo errhandler
- If Text2.Text = "" Then
- Text2.Text = Text1.Text
- Text1.Text = ""
- End If
- If Text2.Text > "0" Then
- Text1.Text = Text2.Text * Text1.Text
- Text2.Text = Text1.Text
- Text1.Text = ""
- End If
- errhandler:
- End Sub
- Private Sub Command3_Click()
- End Sub
- Private Sub Command4_Click()
- Label2.Caption = "0"
- Text1.Text = ""
- Text2.Text = ""
- End Sub
-